<p class="Paragraph">Used to declare and define a subroutine in a <help:key-word value="DLL (Dynamic Link Library)" tag="kw66561_2"/>DLL (Dynamic Link Library) to be executed from <help:productname>%PRODUCTNAME</help:productname> Basic.</p>
<p class="Paragraph">Name: A different name than defined in the DLL, used to call the subroutine from Basic.</p>
<p class="Paragraph">Aliasname: Name of the subroutine as defined in the DLL.</p>
<p class="Paragraph">Libname: File or system name of the DLL. This library is automatically loaded the first time the function is used.</p>
<p class="Paragraph">Argumentlist: List of parameters representing arguments that are passed to the procedure when it is called. The type and number of parameters is dependent on the executed procedure.</p>
<p class="Paragraph">Type: Defines the data type of the value returned by a Function procedure. This can be excluded if a type-declaration character is entered after the name.</p>
<p class="TextInTable">Parameters must be indicated by the keyword <span class="T1">ByVal</span> if they are to be passed to the subroutine as a value instead of as a <text:s text:c="" xmlns:text="http://openoffice.org/2000/text"/>reference.</p>
</span></th></tr></table>
<p class="Paragraph"/>
<p class="P2">Example:</p>
<p class="PropText">Declare Sub MyMessageBeep Lib "user32.dll" Alias "MessageBeep" ( long )</p>
<p class="PropText"/>
<p class="PropText">Sub ExampleDeclare</p>
<p class="PropText"><text:tab-stop xmlns:text="http://openoffice.org/2000/text"/>Dim lValue As Long</p>